package com.jxx.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jxx.pojo.Item;
import com.jxx.vo.ItemDetails;
import org.apache.ibatis.annotations.Select;

public interface ItemMapper extends BaseMapper<Item> {
    @Select("SELECT * FROM \n" +
            "(SELECT i.*,d.item_desc,c.category_name FROM item i,item_desc d,category c WHERE i.item_id=d.item_id AND i.category_id=c.category_id)d \n" +
            "WHERE item_id=#{itemId}\n")
    ItemDetails selectByItemId(Integer itemId);
}
